<!Doctype html>
<html>

	<head>
		<meta name="Generator" content="NO" />
		<meta charset="UTF-8" />
		<meta name="Keywords" content="" />
		<meta name="Description" content="" />
		<title>滑门</title>
	</head>

	<body>
		<center>
			<div>top</div>
			<div id="MyMoveAd" style="background:#ff0000;height:0px;overflow:hidden;">
				<a href="#" target="_blank"><img src="2009313104412586.gif" border="0" /></a>
			</div>
			<a href="#" id="downs" style="display:block;width:100%; background:red;">
				<img src="2009313104412559.gif" border="0">
			</a>
			<div>avb</div>
		</center>
		<script type="text/javascript">
			var intervalId = null;

			function slideAd(id, nStayTime, sState, nMaxHth, nMinHth) {
				this.stayTime = nStayTime * 1000 || 3000; //5000  
				this.maxHeigth = nMaxHth || 330;  //330
				this.minHeigth = nMinHth || 2.5;  //2.5
				this.state = sState || "down";    //dowm
				var obj = document.getElementById(id);
				if (intervalId != null) window.clearInterval(intervalId);

				function openBox() {
					var h = obj.offsetHeight;
					obj.style.height = ((this.state == "down") ? (h + 3) : (h - 3)) + "px";
					if (obj.offsetHeight > this.maxHeigth) {
						window.clearInterval(intervalId);
						intervalId = window.setInterval(closeBox, this.stayTime);
					}
					if (obj.offsetHeight < this.minHeigth) {
						window.clearInterval(intervalId);
						// obj.style.display="none";
						intervalId = null;
					}
				}

				function closeBox() {
					slideAd(id, this.stayTime, "up", nMaxHth, nMinHth);
				}
				intervalId = window.setInterval(openBox, 30);
			}

			slideAd('MyMoveAd', 5); //加载完触发

			var Onclick = document.getElementById("downs");
			Onclick.onclick = function() {
				if (intervalId == null) {
					slideAd('MyMoveAd', 5);
				}
			}
		</script>

	</body>

</html>